package com.lagou.service;

import com.lagou.domain.ResourceCategory;
import com.lagou.domain.Role;
import com.lagou.domain.RoleMenuVo;
import com.lagou.domain.RoleResourceVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


public interface RoleService {

    /*查询所有角色(条件)*/
    public List<Role> findAllRole(Role role);

    /*通过角色id进行查询已经关联的菜单信息id*/
    public List<Integer> findMenuByRoleId(Integer id);

    /*为角色分配菜单*/
    public void roleContextMenu(RoleMenuVo roleMenuVo);

    /*删除角色*/
    public void deleteRole(Integer roleid);

    /*添加角色&修改角色*/
    public void saveRoles(Role role);
    public void updateRoles(Role role);

    /*获取当前角色拥有的资源信息*/
    public List<ResourceCategory> findResourceListByRoleId(Integer roleId);

    /*为角色分配资源*/
    public void roleContextResource(RoleResourceVO roleResourceVO);
}
